<?php
require 'class.php';
$schoolMngr = new SchoolManagement;


if(isset($parameters[1]))
{
	if(isset($parameters[2]) && !ctype_digit($parameters[2]))
	{
		die("Illegal Student number");
	}
	
	switch($parameters[1])
	{
		case 'add_school':
			echo $schoolMngr->showAddSchoolForm();
			break;
		case 'edit_school':
			echo $schoolMngr->showEditSchoolForm($parameters[2]);
			break;
		case 'delete_school':
			echo $schoolMngr->showDeleteSchoolConfirmation($parameters[2]);
			break;
		case 'show_school':
			echo $schoolMngr->showSchool($parameters[2]);
			break;
		case 'add_class':
			echo $schoolMngr->showAddClassForm($parameters[2]);
			break;
		case 'edit_class':
			echo $schoolMngr->showEditClassForm($parameters[2]);
			break;
		case 'delete_class':
			echo $schoolMngr->showDeleteClassConfirmation($parameters[2]);
			break;
		default:
			echo $schoolMngr->showSchoolList();
			break;
	}
}
else
{
	echo $schoolMngr->showSchoolList();
}